#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QObject>
#include <QThread>

extern "C"{
    #include <stdio.h>
    #include <sys/types.h>
    #include <fcntl.h>
    #include <sys/stat.h>
    #include <unistd.h>
    #include <pthread.h>
    #include <semaphore.h>
    #include <stdlib.h>
}

class Mythread : public QThread
{
    Q_OBJECT
public:
    explicit Mythread(QObject *parent = nullptr);
    int ret;
    int fifo_c;
    int fifo_q;
    void qt_send(char data);
    u_int8_t r_data;
//    int flag = 0;

signals:
    void task_signal(void);

private:
    void run() override;


};

#endif // MYTHREAD_H
